﻿#pragma once

class AnalyseTreeNodeCondition;

class CAllowReaderHandle
{
public:
	CAllowReaderHandle();
	void SetOperaterPtr(AnalyseTreeNodeCondition*& pNode);

public:
	bool HandleBool(const std::wstring& key, bool b);
	bool HandleInt(const std::wstring& key, int i);
	bool HandleDouble(const std::wstring& key, double d);
	bool HandleString(const std::wstring& key, const std::wstring& str);
	bool HandleStartObj(const std::wstring& key);
	bool HandleEndObj();

private:
	AnalyseTreeNodeCondition* m_pAllowOper = nullptr;		// 正在操作的node指针

	std::unordered_map<std::wstring, std::function<void(void*)>> m_map_OperatorFunction;		// <关键字,回调lambda函数>
};

